<template lang="">
    <div >
        <div class="headFunction">
            <el-row :gutter="10" type="flex">
             <el-col :span="14"><el-input v-model="input"  size="small "  placeholder="根据用户名搜索"></el-input></el-col>
             <el-col :span="5"> <el-button plain size="small " @click="inputS">清空</el-button></el-col>
              <el-col :span="5"> <el-button type="primary" size="small " @click="$emit('search',input)">搜索</el-button></el-col>
            </el-row>
          <div>
              <el-button type="success" size="small " @click="$emit('add')"><i class="el-icon-edit"></i> {{Function}}</el-button>
          </div>
        </div>

    </div>
</template>
<script>
export default {
  data () {
    return {
      input: ''
    }
  },
  props: {
    Function: {
      type: String,
      default: '按钮'
    }
  },
  methods: {
    inputS () {
      this.input = ''
      this.$parent.list()
    }
  }
}
</script>
<style lang="scss" scoped>
.headFunction{
  // height:40px;
  display: flex;
  justify-content: space-between;
}
</style>
